<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
ini_set('max_execution_time', '0');
/**
* 获取wish通知
*/
class Wishgetmessage
{
	
	function __construct()
	{
		
	}

public function getmessage(){
$access_token = urlencode('61416130a5b14d6cbd3c4f114fb380a1');

$start = urlencode('0');
$limit = urlencode('50');

$url = sprintf(
    "https://merchant.wish.com/api/v2/noti/fetch-unviewed?access_token=%s&limit=%s&start=%s",
    $access_token, $limit, $start);

$context = stream_context_create(array(
    'http' => array(
        'method'        => 'GET',
        'ignore_errors' => true,
    ),
));

// Send the request
$response = file_get_contents($url, TRUE, $context);
echo $response;
echo "\n";


// $url2="http://merchant.wish.com/payment-detail/598846e139d9cd67d0c4e508";
// echo file_get_contents($url2, TRUE, $context);




}



}



?>